package com.nuoniu.sibanyun.mapper.production;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuoniu.sibanyun.entity.production.VProductionPlanMain;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 生产计划主表 Mapper 接口
 * </p>
 *
 * @author 小啊刚
 * @since 2021-03-11
 */
public interface VProductionPlanMainMapper extends BaseMapper<VProductionPlanMain> {

    @Select("select voucher_code from ma_mps where company_id=#{companyId} and date_format(create_date, #{dateStr})=date_format(now(), #{dateStr}) order by create_date desc limit 1")
    String getNewestCode(Integer companyId, String dateStr);
}
